package test4_11.demo05;

import java.io.Serializable;
import java.util.Date;

//定义一个学生类 Student,有属性,Date brith,String name,int height,String degree,
// 定义两个对象,将此对象写到文件中,并在另外一个工程中,将些内容读出.
public class Student implements Serializable {

    private Date brith;
    private String name;
    private int height;
    private String degree;

    //long serialVersionUID = 1;

    public Student(Date brith, String name, int height, String degree) {
        this.brith = brith;
        this.name = name;
        this.height = height;
        this.degree = degree;
    }

    public Date getBrith() {
        return brith;
    }

    public void setBrith(Date brith) {
        this.brith = brith;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public String getDegree() {
        return degree;
    }

    public void setDegree(String degree) {
        this.degree = degree;
    }

    @Override
    public String toString() {
        return "Student{" +
                "brith=" + brith +
                ", name='" + name + '\'' +
                ", height=" + height +
                ", degree='" + degree + '\'' +
                '}';
    }
}
